#! c:\Python27\python.exe

import socket
import pickle
import sys

class MySocketClass():
	def sendObject(self, s, data):
		print "sending object", repr(data)
		sys.stdout.flush()
		f = s.makefile("w")
		pickle.dump(data, f)
		
	def recvObject(self, s):
		print "recving object"
		sys.stdout.flush()
		f = s.makefile("r")
		return pickle.load(f)
	
MySocket = MySocketClass()